#include "BA.h"

void BA_reset(outC_BA *outC)
{
	outC->acg_init = acg_true;
}

void BA(acg_bool Act, acg_int In1, acg_int In2, acg_int deafult,  outC_BA *outC)
{
	if(Act)
	{
		outC->Out = In1 + In2;
	}
	else
	{
		if(outC->acg_init)
			outC->acg_fby1 = deafult;
		else
			outC->acg_fby1 = outC->Out;
		outC->Out = acg_fby1;
	}
	outC->acg_init = acg_false;
}